1. Field of the Invention
The present invention relates to an image region detection technique for inputting, through an image input device, a printed image that includes an image in which prescribed codes are embedded, and detecting, on the input image, a quadrangular region in which the codes are embedded.
2. Description of the Related Art
In recent years, techniques of embedding invisible codes in digital data or in printed images have been developed. In order to read code information from input images in which prescribed codes (simply referred to as “codes”, hereinafter) are embedded (the input images having been photographed by using image input devices such as cameras or scanners included in mobile phones), the coordinates of the four corners of the quadrangular region in which the codes are embedded are determined, and decoding is performed on the basis of the determined coordinates of the four corners.
In the conventional image region detection methods for detecting the coordinates of four corners (such as those disclosed in, for example, Japanese Patent Application Publication Nos. 2005-277732 and 2005-182164), the detection is performed in such a manner that the initial coordinates from which the image region detection starts are set in the peripheral area of the input image, and the sides of the quadrangular region are thus detected; thereafter, the coordinates of the four corners are obtained to be used for the region detection.
In the conventional technique of detecting the four corners of the quadrangular region, searches for the sides of the quadrangular region have been performed from the peripheral area of the input image. Thus, when there is another quadrangular region that includes the quadrangular region that has to be detected, this other, outer quadrangular region is detected, and the inner quadrangular region that has to be detected is not detected, which has been problematic.